.class public Llt/noframe/gpsfarmguide/sprayer/SprayController;
.super Ljava/lang/Object;
.source "SprayController.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator$OnShtrichLineSetListener;


# instance fields
.field private animatingCamera:Z

.field private autoFirstTaken:Z

.field private automaticBegin:Z

.field private bearingLastCamera:D

.field private coordsCount:I

.field private crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

.field private ctx:Landroid/content/Context;

.field private displayPolygons:Z

.field private error:Z

.field private generator:Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;

.field private gps_location:D

.field private implement_location:D

.field private jumped_points:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field

.field private lastPoint:Lcom/google/android/gms/maps/model/LatLng;

.field private lastSprayed:Lcom/google/android/gms/maps/model/LatLng;

.field private locMarkOptions:Lcom/google/android/gms/maps/model/MarkerOptions;

.field location:Landroid/location/Location;

.field private locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

.field mark1:Lcom/google/android/gms/maps/model/Marker;

.field mark2:Lcom/google/android/gms/maps/model/Marker;

.field private markLocation:Lcom/google/android/gms/maps/model/Marker;

.field naviLineOne:Lcom/google/android/gms/maps/model/LatLng;

.field naviLineTwo:Lcom/google/android/gms/maps/model/LatLng;

.field private naviType:I

.field private navig:Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

.field public onCameraMoveListener:Lcom/google/android/gms/maps/GoogleMap$OnCameraMoveListener;

.field onGuiRequest:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater$RunnableTimeListener;

.field onLocationChanged:Lcom/google/android/gms/maps/LocationSource$OnLocationChangedListener;

.field public onMapClicked:Lcom/google/android/gms/maps/GoogleMap$OnMapClickListener;

.field private path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

.field private point_is_spraying:Z

.field private progress:Landroid/app/ProgressDialog;

.field private resumed:Z

.field private sprayState:I

.field private sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

.field private status:I

.field private statusBarUpdater:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

.field private techWidth:D

.field time:Llt/noframe/gpsfarmguide/TestTimeUtility;

.field private tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;


# direct methods
.method public constructor <init>(Landroid/content/Context;DI)V
    .locals 15

    move-object v0, p0

    move-object/from16 v1, p1

    move-wide/from16 v10, p2

    .line 110
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v12, 0x0

    .line 54
    iput v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v13, 0x1

    .line 55
    iput v13, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    const/4 v2, 0x0

    .line 59
    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    .line 60
    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastSprayed:Lcom/google/android/gms/maps/model/LatLng;

    const-wide/16 v2, 0x0

    .line 61
    iput-wide v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->bearingLastCamera:D

    .line 63
    iput v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->naviType:I

    .line 64
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->autoFirstTaken:Z

    .line 65
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->automaticBegin:Z

    .line 71
    iput-wide v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->gps_location:D

    .line 72
    iput-wide v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->implement_location:D

    .line 74
    iput v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->coordsCount:I

    .line 87
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->error:Z

    .line 88
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    .line 89
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->resumed:Z

    .line 90
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->point_is_spraying:Z

    .line 94
    iput-boolean v13, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->displayPolygons:Z

    .line 104
    new-instance v2, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    invoke-direct {v2}, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;-><init>()V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    .line 108
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->animatingCamera:Z

    .line 310
    new-instance v2, Llt/noframe/gpsfarmguide/sprayer/SprayController$1;

    invoke-direct {v2, p0}, Llt/noframe/gpsfarmguide/sprayer/SprayController$1;-><init>(Llt/noframe/gpsfarmguide/sprayer/SprayController;)V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onMapClicked:Lcom/google/android/gms/maps/GoogleMap$OnMapClickListener;

    .line 324
    new-instance v2, Llt/noframe/gpsfarmguide/sprayer/SprayController$2;

    invoke-direct {v2, p0}, Llt/noframe/gpsfarmguide/sprayer/SprayController$2;-><init>(Llt/noframe/gpsfarmguide/sprayer/SprayController;)V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onCameraMoveListener:Lcom/google/android/gms/maps/GoogleMap$OnCameraMoveListener;

    .line 341
    new-instance v2, Llt/noframe/gpsfarmguide/sprayer/SprayController$3;

    invoke-direct {v2, p0}, Llt/noframe/gpsfarmguide/sprayer/SprayController$3;-><init>(Llt/noframe/gpsfarmguide/sprayer/SprayController;)V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onLocationChanged:Lcom/google/android/gms/maps/LocationSource$OnLocationChangedListener;

    .line 458
    new-instance v2, Llt/noframe/gpsfarmguide/sprayer/SprayController$4;

    invoke-direct {v2, p0}, Llt/noframe/gpsfarmguide/sprayer/SprayController$4;-><init>(Llt/noframe/gpsfarmguide/sprayer/SprayController;)V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onGuiRequest:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater$RunnableTimeListener;

    .line 111
    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    .line 112
    new-instance v2, Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-direct {v2}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;-><init>()V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    .line 113
    iput-wide v10, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->techWidth:D

    move/from16 v2, p4

    .line 114
    iput v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->naviType:I

    .line 115
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->autoFirstTaken:Z

    .line 116
    iput-boolean v12, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->automaticBegin:Z

    .line 117
    new-instance v2, Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    invoke-direct {v2, v1, v10, v11}, Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;-><init>(Landroid/content/Context;D)V

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->navig:Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    .line 118
    new-instance v14, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getId()I

    move-result v3

    new-instance v9, Ljava/util/ArrayList;

    invoke-direct {v9}, Ljava/util/ArrayList;-><init>()V

    const/4 v2, 0x0

    const-string v4, ""

    const-wide/16 v5, 0x0

    const-wide/16 v7, 0x0

    move-object v1, v14

    invoke-direct/range {v1 .. v11}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;-><init>(IILjava/lang/String;JJLjava/util/List;D)V

    iput-object v14, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    .line 119
    new-instance v1, Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onGuiRequest:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater$RunnableTimeListener;

    invoke-direct {v1, v2}, Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;-><init>(Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater$RunnableTimeListener;)V

    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->statusBarUpdater:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

    .line 120
    new-instance v1, Llt/noframe/gpsfarmguide/TestTimeUtility;

    invoke-direct {v1}, Llt/noframe/gpsfarmguide/TestTimeUtility;-><init>()V

    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->time:Llt/noframe/gpsfarmguide/TestTimeUtility;

    .line 122
    new-instance v1, Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-direct {v1}, Lcom/google/android/gms/maps/model/MarkerOptions;-><init>()V

    const v2, 0x7f08016a

    invoke-static {v2}, Lcom/google/android/gms/maps/model/BitmapDescriptorFactory;->fromResource(I)Lcom/google/android/gms/maps/model/BitmapDescriptor;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/google/android/gms/maps/model/MarkerOptions;->icon(Lcom/google/android/gms/maps/model/BitmapDescriptor;)Lcom/google/android/gms/maps/model/MarkerOptions;

    .line 123
    invoke-virtual {v1, v12}, Lcom/google/android/gms/maps/model/MarkerOptions;->draggable(Z)Lcom/google/android/gms/maps/model/MarkerOptions;

    const/high16 v2, 0x3f000000    # 0.5f

    const v3, 0x3f333333    # 0.7f

    .line 124
    invoke-virtual {v1, v2, v3}, Lcom/google/android/gms/maps/model/MarkerOptions;->anchor(FF)Lcom/google/android/gms/maps/model/MarkerOptions;

    const-string v2, "marker_empty"

    .line 125
    invoke-virtual {v1, v2}, Lcom/google/android/gms/maps/model/MarkerOptions;->snippet(Ljava/lang/String;)Lcom/google/android/gms/maps/model/MarkerOptions;

    .line 126
    invoke-virtual {v1, v13}, Lcom/google/android/gms/maps/model/MarkerOptions;->flat(Z)Lcom/google/android/gms/maps/model/MarkerOptions;

    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locMarkOptions:Lcom/google/android/gms/maps/model/MarkerOptions;

    .line 127
    new-instance v1, Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    invoke-direct {v1}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;-><init>()V

    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    .line 128
    iget-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onLocationChanged:Lcom/google/android/gms/maps/LocationSource$OnLocationChangedListener;

    invoke-virtual {v1, v2}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;->activate(Lcom/google/android/gms/maps/LocationSource$OnLocationChangedListener;)V

    return-void
.end method

.method private ABInput(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 3

    .line 374
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    const-string v1, "NV"

    if-nez v0, :cond_1

    .line 375
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v0

    new-instance v2, Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-direct {v2}, Lcom/google/android/gms/maps/model/MarkerOptions;-><init>()V

    invoke-virtual {v2, p1}, Lcom/google/android/gms/maps/model/MarkerOptions;->position(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-virtual {v2, v1}, Lcom/google/android/gms/maps/model/MarkerOptions;->snippet(Ljava/lang/String;)Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-virtual {v0, v2}, Lcom/google/android/gms/maps/GoogleMap;->addMarker(Lcom/google/android/gms/maps/model/MarkerOptions;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    const/4 p1, 0x1

    .line 376
    iput-boolean p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->autoFirstTaken:Z

    .line 378
    iget p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v0, 0x3

    const/4 v1, 0x2

    if-ne p1, v0, :cond_0

    .line 379
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object p1

    invoke-virtual {p1, v1}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->setState(I)V

    .line 381
    :cond_0
    iget p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    if-ne p1, v1, :cond_2

    .line 382
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p1

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object p1

    const/4 v0, 0x4

    invoke-virtual {p1, v0}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->setState(I)V

    goto :goto_0

    .line 385
    :cond_1
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v0

    new-instance v2, Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-direct {v2}, Lcom/google/android/gms/maps/model/MarkerOptions;-><init>()V

    invoke-virtual {v2, p1}, Lcom/google/android/gms/maps/model/MarkerOptions;->position(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-virtual {v2, v1}, Lcom/google/android/gms/maps/model/MarkerOptions;->snippet(Ljava/lang/String;)Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-virtual {v0, v2}, Lcom/google/android/gms/maps/GoogleMap;->addMarker(Lcom/google/android/gms/maps/model/MarkerOptions;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark2:Lcom/google/android/gms/maps/model/Marker;

    .line 387
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    invoke-virtual {p1}, Lcom/google/android/gms/maps/model/Marker;->getPosition()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->naviLineOne:Lcom/google/android/gms/maps/model/LatLng;

    .line 388
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark2:Lcom/google/android/gms/maps/model/Marker;

    invoke-virtual {p1}, Lcom/google/android/gms/maps/model/Marker;->getPosition()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->naviLineTwo:Lcom/google/android/gms/maps/model/LatLng;

    .line 393
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    invoke-virtual {p1}, Lcom/google/android/gms/maps/model/Marker;->getPosition()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object p1

    .line 394
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark2:Lcom/google/android/gms/maps/model/Marker;

    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Marker;->getPosition()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    .line 396
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    invoke-virtual {v1}, Lcom/google/android/gms/maps/model/Marker;->remove()V

    const/4 v1, 0x0

    iput-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    .line 397
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark2:Lcom/google/android/gms/maps/model/Marker;

    invoke-virtual {v2}, Lcom/google/android/gms/maps/model/Marker;->remove()V

    iput-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark2:Lcom/google/android/gms/maps/model/Marker;

    .line 399
    invoke-virtual {p0, p1, v0}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->setShtrich(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    :cond_2
    :goto_0
    return-void
.end method

.method static synthetic access$000(Llt/noframe/gpsfarmguide/sprayer/SprayController;)I
    .locals 0

    .line 46
    iget p0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    return p0
.end method

.method static synthetic access$100(Llt/noframe/gpsfarmguide/sprayer/SprayController;Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 0

    .line 46
    invoke-direct {p0, p1}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ABInput(Lcom/google/android/gms/maps/model/LatLng;)V

    return-void
.end method

.method static synthetic access$200(Llt/noframe/gpsfarmguide/sprayer/SprayController;)Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;
    .locals 0

    .line 46
    iget-object p0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    return-object p0
.end method

.method static synthetic access$300(Llt/noframe/gpsfarmguide/sprayer/SprayController;)Lcom/google/android/gms/maps/model/Marker;
    .locals 0

    .line 46
    iget-object p0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->markLocation:Lcom/google/android/gms/maps/model/Marker;

    return-object p0
.end method

.method static synthetic access$302(Llt/noframe/gpsfarmguide/sprayer/SprayController;Lcom/google/android/gms/maps/model/Marker;)Lcom/google/android/gms/maps/model/Marker;
    .locals 0

    .line 46
    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->markLocation:Lcom/google/android/gms/maps/model/Marker;

    return-object p1
.end method

.method static synthetic access$400(Llt/noframe/gpsfarmguide/sprayer/SprayController;)Lcom/google/android/gms/maps/model/MarkerOptions;
    .locals 0

    .line 46
    iget-object p0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locMarkOptions:Lcom/google/android/gms/maps/model/MarkerOptions;

    return-object p0
.end method

.method static synthetic access$500(Llt/noframe/gpsfarmguide/sprayer/SprayController;)Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;
    .locals 0

    .line 46
    iget-object p0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    return-object p0
.end method

.method static synthetic access$602(Llt/noframe/gpsfarmguide/sprayer/SprayController;Z)Z
    .locals 0

    .line 46
    iput-boolean p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->animatingCamera:Z

    return p1
.end method

.method private initSpray(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)I
    .locals 19

    move-object/from16 v0, p0

    const/4 v1, 0x0

    .line 181
    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    .line 182
    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark2:Lcom/google/android/gms/maps/model/Marker;

    const/4 v1, 0x0

    .line 183
    iput v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->coordsCount:I

    .line 185
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object v2

    .line 187
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getLocationProvider()Llt/noframe/gpsfarmguide/gps/AppLocationProvider;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider;->getLocationsources()Ljava/util/List;

    move-result-object v3

    iget-object v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    invoke-interface {v3, v4}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 188
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getLocationProvider()Llt/noframe/gpsfarmguide/gps/AppLocationProvider;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider;->getLocationsources()Ljava/util/List;

    move-result-object v3

    iget-object v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 189
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->statusBarUpdater:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;->run()V

    .line 190
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    iget-object v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onMapClicked:Lcom/google/android/gms/maps/GoogleMap$OnMapClickListener;

    invoke-virtual {v3, v4}, Lcom/google/android/gms/maps/GoogleMap;->setOnMapClickListener(Lcom/google/android/gms/maps/GoogleMap$OnMapClickListener;)V

    .line 191
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    iget-object v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->onCameraMoveListener:Lcom/google/android/gms/maps/GoogleMap$OnCameraMoveListener;

    invoke-virtual {v3, v4}, Lcom/google/android/gms/maps/GoogleMap;->setOnCameraMoveListener(Lcom/google/android/gms/maps/GoogleMap$OnCameraMoveListener;)V

    .line 193
    iget v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->naviType:I

    const/4 v4, 0x2

    const/4 v5, 0x3

    const/4 v6, 0x1

    if-eqz v3, :cond_3

    if-eq v3, v6, :cond_2

    const v7, 0x7f110187

    if-eq v3, v4, :cond_1

    if-eq v3, v5, :cond_0

    goto/16 :goto_0

    .line 221
    :cond_0
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->removePath()V

    .line 222
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->reset()V

    .line 223
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getDisplayTrackInMap()Llt/noframe/gpsfarmguide/sprayer/spray/DisplayTrackInMap;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/DisplayTrackInMap;->removePolygons()V

    .line 224
    new-instance v3, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    const/4 v9, 0x0

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v4

    invoke-virtual {v4}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v4

    invoke-virtual {v4}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getId()I

    move-result v10

    const-wide/16 v12, 0x0

    const-wide/16 v14, 0x0

    new-instance v16, Ljava/util/ArrayList;

    invoke-direct/range {v16 .. v16}, Ljava/util/ArrayList;-><init>()V

    iget-wide v5, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->techWidth:D

    const-string v11, ""

    move-object v8, v3

    move-wide/from16 v17, v5

    invoke-direct/range {v8 .. v18}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;-><init>(IILjava/lang/String;JJLjava/util/List;D)V

    iput-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    .line 225
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-virtual {v3, v4, v5}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setStartDate(J)V

    .line 226
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    invoke-virtual {v3, v7}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->showError(Ljava/lang/String;)V

    const/4 v3, 0x3

    .line 227
    iput v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v5, 0x1

    .line 228
    iput v5, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    .line 229
    invoke-virtual/range {p0 .. p2}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->setShtrich(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    goto :goto_0

    :cond_1
    const/4 v3, 0x3

    const/4 v5, 0x1

    .line 213
    iget-object v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    invoke-virtual {v4, v7}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v4}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->showError(Ljava/lang/String;)V

    .line 214
    iput v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    .line 215
    iput v5, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    .line 216
    invoke-virtual/range {p0 .. p2}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->setShtrich(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    goto :goto_0

    :cond_2
    const/4 v3, 0x3

    const/4 v5, 0x1

    .line 206
    invoke-virtual {v2, v5}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->setState(I)V

    .line 207
    iput v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    .line 208
    iput v5, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    goto :goto_0

    :cond_3
    const/4 v3, 0x3

    const/4 v5, 0x1

    .line 196
    invoke-virtual {v2, v3}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->setState(I)V

    .line 197
    iput v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v2, 0x4

    .line 198
    iput v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    .line 199
    iput-boolean v5, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->automaticBegin:Z

    .line 200
    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->statusBarUpdater:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;->startTimer()V

    .line 201
    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

    invoke-virtual {v2, v3, v4}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setStartDate(J)V

    .line 234
    :goto_0
    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getGpsLocationInTractor(Landroid/content/Context;)D

    move-result-wide v2

    iput-wide v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->gps_location:D

    .line 235
    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    invoke-static {v2}, Llt/noframe/gpsfarmguide/utils/Preferences;->getImplementLocation(Landroid/content/Context;)D

    move-result-wide v2

    iput-wide v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->implement_location:D

    .line 237
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v2

    invoke-virtual {v2}, Lcom/google/android/gms/maps/GoogleMap;->getMyLocation()Landroid/location/Location;

    move-result-object v2

    if-eqz v2, :cond_5

    .line 239
    new-instance v2, Lcom/google/android/gms/maps/model/LatLng;

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    invoke-virtual {v3}, Lcom/google/android/gms/maps/GoogleMap;->getMyLocation()Landroid/location/Location;

    move-result-object v3

    invoke-virtual {v3}, Landroid/location/Location;->getLatitude()D

    move-result-wide v3

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v5

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v5

    invoke-virtual {v5}, Lcom/google/android/gms/maps/GoogleMap;->getMyLocation()Landroid/location/Location;

    move-result-object v5

    invoke-virtual {v5}, Landroid/location/Location;->getLongitude()D

    move-result-wide v5

    invoke-direct {v2, v3, v4, v5, v6}, Lcom/google/android/gms/maps/model/LatLng;-><init>(DD)V

    .line 240
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->markLocation:Lcom/google/android/gms/maps/model/Marker;

    if-eqz v3, :cond_4

    invoke-virtual {v3}, Lcom/google/android/gms/maps/model/Marker;->remove()V

    .line 241
    :cond_4
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v3

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v3

    iget-object v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locMarkOptions:Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-virtual {v4, v2}, Lcom/google/android/gms/maps/model/MarkerOptions;->position(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/MarkerOptions;

    invoke-virtual {v3, v4}, Lcom/google/android/gms/maps/GoogleMap;->addMarker(Lcom/google/android/gms/maps/model/MarkerOptions;)Lcom/google/android/gms/maps/model/Marker;

    move-result-object v2

    iput-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->markLocation:Lcom/google/android/gms/maps/model/Marker;

    .line 243
    :cond_5
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getLocationProvider()Llt/noframe/gpsfarmguide/gps/AppLocationProvider;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider;->startNavigation()V

    .line 244
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v2

    invoke-virtual {v2, v1}, Lcom/google/android/gms/maps/GoogleMap;->setMyLocationEnabled(Z)V

    const/4 v1, 0x1

    return v1
.end method


# virtual methods
.method public addNavigationPointFromGps()Z
    .locals 1

    .line 363
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    if-eqz v0, :cond_0

    .line 364
    invoke-direct {p0, v0}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ABInput(Lcom/google/android/gms/maps/model/LatLng;)V

    const/4 v0, 0x1

    return v0

    :cond_0
    const/4 v0, 0x0

    return v0
.end method

.method public endSpray()V
    .locals 6

    .line 256
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {v0}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->deleteSprayed()V

    .line 257
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->navig:Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;->removeNaviLines()V

    const/4 v0, 0x1

    .line 258
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    .line 259
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    .line 261
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;->deactivate()V

    .line 262
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getLocationProvider()Llt/noframe/gpsfarmguide/gps/AppLocationProvider;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider;->getLocationsources()Ljava/util/List;

    move-result-object v1

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    invoke-interface {v1, v2}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 263
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getLocationProvider()Llt/noframe/gpsfarmguide/gps/AppLocationProvider;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider;->startFree()V

    .line 264
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/GoogleMap;->setMyLocationEnabled(Z)V

    .line 265
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->markLocation:Lcom/google/android/gms/maps/model/Marker;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Marker;->remove()V

    .line 266
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->removePath()V

    .line 268
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->statusBarUpdater:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

    const/4 v1, 0x0

    if-eqz v0, :cond_1

    .line 269
    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;->stop()V

    .line 270
    iput-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->statusBarUpdater:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

    .line 273
    :cond_1
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark1:Lcom/google/android/gms/maps/model/Marker;

    if-eqz v0, :cond_2

    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Marker;->remove()V

    .line 274
    :cond_2
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->mark2:Lcom/google/android/gms/maps/model/Marker;

    if-eqz v0, :cond_3

    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Marker;->remove()V

    .line 276
    :cond_3
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getPath()D

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setDistance(D)V

    .line 277
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {v2}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->getArea()D

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setArea(D)V

    .line 278
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->naviLineOne:Lcom/google/android/gms/maps/model/LatLng;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->naviLineTwo:Lcom/google/android/gms/maps/model/LatLng;

    invoke-virtual {v0, v2, v3}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setNaviLines(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    .line 279
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setEndDate(J)V

    .line 280
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getNavigationBottom()Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BottomBar;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BottomBar;->getTime_elapsed()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->appendTimeWasted(J)V

    .line 282
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {v0}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->getArea()D

    move-result-wide v2

    const-wide v4, 0x3f50624dd2f1a9fcL    # 0.001

    cmpl-double v0, v2, v4

    if-gtz v0, :cond_4

    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getPath()D

    move-result-wide v2

    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    cmpl-double v0, v2, v4

    if-lez v0, :cond_6

    .line 283
    :cond_4
    new-instance v0, Llt/noframe/gpsfarmguide/database/DbTracks;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/database/DbTracks;-><init>()V

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v2

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/models/MeasuringModel;->getId()I

    move-result v2

    invoke-virtual {v0, v2}, Llt/noframe/gpsfarmguide/database/DbTracks;->getTracksCount(I)I

    move-result v0

    invoke-static {}, Llt/noframe/gpsfarmguide/AppPermissions;->tracksPerFieldLimit()I

    move-result v2

    if-ge v0, v2, :cond_6

    .line 284
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getId()I

    move-result v0

    if-eqz v0, :cond_5

    .line 285
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v0, v2, v3}, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;->overriteTrack(Landroid/content/Context;Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;)V

    goto :goto_0

    .line 287
    :cond_5
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->tracksDialogs:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v0, v2, v3}, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;->saveTrack(Landroid/content/Context;Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;)V

    .line 293
    :cond_6
    :goto_0
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/GoogleMap;->setOnCameraMoveListener(Lcom/google/android/gms/maps/GoogleMap$OnCameraMoveListener;)V

    return-void
.end method

.method public getLocatinSpeed()D
    .locals 2

    .line 451
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->location:Landroid/location/Location;

    if-eqz v0, :cond_0

    .line 452
    invoke-virtual {v0}, Landroid/location/Location;->getSpeed()F

    move-result v0

    float-to-double v0, v0

    return-wide v0

    :cond_0
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public initSprayPolygons(Ljava/util/List;Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;D)I
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/Polygon;",
            ">;",
            "Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;",
            "D)I"
        }
    .end annotation

    .line 132
    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;

    iget-wide v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->techWidth:D

    invoke-direct {v0, v1, v2}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;-><init>(D)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    .line 134
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Preferences;->isDisplaySprayedArea(Landroid/content/Context;)Z

    move-result v0

    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->displayPolygons:Z

    .line 135
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    iget-boolean v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->displayPolygons:Z

    invoke-interface {v0, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->setIsDraw(Z)V

    const/4 v0, 0x0

    if-eqz p2, :cond_0

    .line 141
    iput-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    .line 142
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {p2, p1, p3, p4}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->setPolys(Ljava/util/List;D)V

    .line 143
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    if-eqz p1, :cond_0

    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    const/4 p2, 0x1

    if-le p1, p2, :cond_0

    .line 145
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    const/4 p3, 0x0

    invoke-interface {p1, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    move-object v0, p1

    check-cast v0, Lcom/google/android/gms/maps/model/LatLng;

    .line 146
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    invoke-interface {p1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/google/android/gms/maps/model/LatLng;

    goto :goto_0

    :cond_0
    move-object p1, v0

    .line 150
    :goto_0
    invoke-direct {p0, v0, p1}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->initSpray(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)I

    move-result p1

    return p1
.end method

.method public initSprayPolyline(Ljava/util/List;Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;D)I
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/Polyline;",
            ">;",
            "Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;",
            "D)I"
        }
    .end annotation

    .line 154
    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/SprayerUsingPolyline;

    iget-wide v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->techWidth:D

    invoke-direct {v0, v1, v2}, Llt/noframe/gpsfarmguide/sprayer/spray/SprayerUsingPolyline;-><init>(D)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    .line 156
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Preferences;->isDisplaySprayedArea(Landroid/content/Context;)Z

    move-result v0

    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->displayPolygons:Z

    .line 157
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    iget-boolean v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->displayPolygons:Z

    invoke-interface {v0, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->setIsDraw(Z)V

    const/4 v0, 0x0

    if-eqz p2, :cond_0

    .line 163
    iput-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    .line 164
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {p2, p1, p3, p4}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->setPolys(Ljava/util/List;D)V

    .line 165
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    if-eqz p1, :cond_0

    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    const/4 p2, 0x1

    if-le p1, p2, :cond_0

    .line 167
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    const/4 p3, 0x0

    invoke-interface {p1, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    move-object v0, p1

    check-cast v0, Lcom/google/android/gms/maps/model/LatLng;

    .line 168
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getNaviLines()Ljava/util/List;

    move-result-object p1

    invoke-interface {p1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/google/android/gms/maps/model/LatLng;

    goto :goto_0

    :cond_0
    move-object p1, v0

    .line 174
    :goto_0
    invoke-direct {p0, v0, p1}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->initSpray(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)I

    move-result p1

    return p1
.end method

.method public onCameraIdle()V
    .locals 0

    return-void
.end method

.method public onCameraMove()V
    .locals 1

    .line 333
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {v0}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->onCameraMove()V

    return-void
.end method

.method public onCancel()V
    .locals 1

    .line 634
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->progress:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    return-void
.end method

.method public onSet()V
    .locals 3

    .line 615
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getLocationProvider()Llt/noframe/gpsfarmguide/gps/AppLocationProvider;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider;->getLocationsources()Ljava/util/List;

    move-result-object v0

    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    invoke-interface {v0, v1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 616
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getLocationProvider()Llt/noframe/gpsfarmguide/gps/AppLocationProvider;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/gps/AppLocationProvider;->getLocationsources()Ljava/util/List;

    move-result-object v0

    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->locationSource:Llt/noframe/gpsfarmguide/gps/AppLocationProvider$AppCustomLocationSource;

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 618
    iget v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v1, 0x3

    if-ne v0, v1, :cond_0

    const/4 v0, 0x1

    .line 619
    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->automaticBegin:Z

    .line 620
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->statusBarUpdater:Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/widgets/BottomNavigationBar/BarUpdater;->startTimer()V

    .line 621
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    invoke-virtual {v0, v1, v2}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setStartDate(J)V

    :cond_0
    const/4 v0, 0x4

    .line 624
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    .line 625
    iget v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v2, 0x5

    if-eq v1, v2, :cond_1

    goto :goto_0

    :cond_1
    const/4 v0, 0x5

    :goto_0
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    .line 626
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object v0

    const/4 v1, 0x6

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->setState(I)V

    .line 628
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->progress:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_2

    .line 629
    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    :cond_2
    return-void
.end method

.method public pauseResumeSpray(Z)V
    .locals 0

    if-eqz p1, :cond_0

    const/4 p1, 0x4

    .line 302
    iput p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    const/4 p1, 0x1

    .line 303
    iput-boolean p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->resumed:Z

    goto :goto_0

    :cond_0
    const/4 p1, 0x5

    .line 305
    iput p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    .line 306
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {p1}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->pauseSpraying()V

    :goto_0
    return-void
.end method

.method public pointEntered(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 9

    .line 405
    iget-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->point_is_spraying:Z

    if-eqz v0, :cond_0

    return-void

    :cond_0
    const/4 v0, 0x1

    .line 407
    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->point_is_spraying:Z

    .line 409
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    const/4 v2, 0x0

    if-eqz v1, :cond_6

    .line 410
    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v3, v1, p1}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->distanceBetween(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v3

    .line 413
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->getLocatinSpeed()D

    move-result-wide v5

    const-wide/high16 v7, 0x4049000000000000L    # 50.0

    add-double/2addr v5, v7

    cmpl-double v1, v3, v5

    if-lez v1, :cond_4

    iget-boolean v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->resumed:Z

    if-nez v1, :cond_4

    iget v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v3, 0x4

    if-ne v1, v3, :cond_4

    .line 414
    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->error:Z

    .line 415
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object v1

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    const v4, 0x7f11021b

    invoke-virtual {v3, v4}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->showError(Ljava/lang/String;)V

    .line 417
    iput-boolean v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->point_is_spraying:Z

    .line 419
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-eqz v1, :cond_2

    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    sub-int/2addr v4, v0

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/LatLng;

    invoke-virtual {v1, v0, p1}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->distanceBetween(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v0

    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->getLocatinSpeed()D

    move-result-wide v3

    add-double/2addr v3, v7

    cmpg-double v5, v0, v3

    if-gez v5, :cond_1

    goto :goto_0

    .line 429
    :cond_1
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->clear()V

    goto :goto_1

    .line 420
    :cond_2
    :goto_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 422
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    const/4 v1, 0x2

    if-le v0, v1, :cond_3

    .line 423
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->dissmissError()V

    .line 424
    iput-boolean v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->error:Z

    .line 425
    invoke-virtual {p0, p1}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayPoint(Lcom/google/android/gms/maps/model/LatLng;)V

    .line 426
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->clear()V

    :cond_3
    :goto_1
    return-void

    .line 433
    :cond_4
    iget-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->error:Z

    if-eqz v0, :cond_5

    .line 434
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->dissmissError()V

    .line 435
    iput-boolean v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->error:Z

    .line 437
    :cond_5
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->jumped_points:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 440
    :cond_6
    invoke-virtual {p0, p1}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayPoint(Lcom/google/android/gms/maps/model/LatLng;)V

    .line 441
    iput-boolean v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->point_is_spraying:Z

    return-void
.end method

.method public seekCamera(Lcom/google/android/gms/maps/model/LatLng;DZ)V
    .locals 6

    .line 543
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->bearingLastCamera:D

    invoke-virtual {v0, p2, p3, v1, v2}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->getBearingDifference(DD)D

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/Math;->abs(D)D

    move-result-wide v0

    const-wide/high16 v2, 0x402e000000000000L    # 15.0

    cmpl-double v4, v0, v2

    if-lez v4, :cond_0

    .line 544
    iput-wide p2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->bearingLastCamera:D

    .line 546
    :cond_0
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getNavigation()Ljava/util/List;

    move-result-object v0

    const/4 v1, 0x1

    if-eqz v0, :cond_2

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/Data;->getNavigation()Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_2

    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->navig:Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;->isNavigationSelected()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 548
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->navig:Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;->getNavigationLinesAsLatLng()[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    .line 549
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    const/4 v3, 0x0

    aget-object v3, v0, v3

    aget-object v0, v0, v1

    invoke-virtual {v2, v3, v0}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->lineSegmentBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v2

    .line 550
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v0, v2, v3, p2, p3}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->getBearingDifference(DD)D

    move-result-wide p2

    invoke-static {p2, p3}, Ljava/lang/Math;->abs(D)D

    move-result-wide p2

    const-wide v4, 0x4056800000000000L    # 90.0

    cmpl-double v0, p2, v4

    if-ltz v0, :cond_1

    const-wide v4, 0x4070e00000000000L    # 270.0

    cmpg-double v0, p2, v4

    if-gtz v0, :cond_1

    const-wide p2, 0x4066800000000000L    # 180.0

    sub-double/2addr v2, p2

    .line 553
    iput-wide v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->bearingLastCamera:D

    goto :goto_0

    .line 555
    :cond_1
    iput-wide v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->bearingLastCamera:D

    .line 558
    :cond_2
    :goto_0
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p2

    .line 559
    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p3

    invoke-virtual {p3}, Lcom/google/android/gms/maps/GoogleMap;->getCameraPosition()Lcom/google/android/gms/maps/model/CameraPosition;

    move-result-object p3

    iget p3, p3, Lcom/google/android/gms/maps/model/CameraPosition;->zoom:F

    .line 560
    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object v0

    invoke-virtual {v0}, Lcom/google/android/gms/maps/GoogleMap;->getCameraPosition()Lcom/google/android/gms/maps/model/CameraPosition;

    move-result-object v0

    iget v0, v0, Lcom/google/android/gms/maps/model/CameraPosition;->tilt:F

    if-eqz p4, :cond_3

    const/high16 p3, 0x41a00000    # 20.0f

    const/high16 v0, 0x42340000    # 45.0f

    .line 567
    :cond_3
    new-instance p4, Lcom/google/android/gms/maps/model/CameraPosition$Builder;

    invoke-direct {p4}, Lcom/google/android/gms/maps/model/CameraPosition$Builder;-><init>()V

    .line 568
    invoke-virtual {p4, p1}, Lcom/google/android/gms/maps/model/CameraPosition$Builder;->target(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/CameraPosition$Builder;

    iget-wide v2, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->bearingLastCamera:D

    double-to-float p1, v2

    .line 569
    invoke-virtual {p4, p1}, Lcom/google/android/gms/maps/model/CameraPosition$Builder;->bearing(F)Lcom/google/android/gms/maps/model/CameraPosition$Builder;

    .line 570
    invoke-virtual {p4, p3}, Lcom/google/android/gms/maps/model/CameraPosition$Builder;->zoom(F)Lcom/google/android/gms/maps/model/CameraPosition$Builder;

    .line 571
    invoke-virtual {p4, v0}, Lcom/google/android/gms/maps/model/CameraPosition$Builder;->tilt(F)Lcom/google/android/gms/maps/model/CameraPosition$Builder;

    .line 572
    invoke-virtual {p4}, Lcom/google/android/gms/maps/model/CameraPosition$Builder;->build()Lcom/google/android/gms/maps/model/CameraPosition;

    move-result-object p1

    .line 574
    iget-boolean p3, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->animatingCamera:Z

    if-eqz p3, :cond_4

    return-void

    .line 577
    :cond_4
    iput-boolean v1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->animatingCamera:Z

    .line 578
    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p2

    invoke-static {p1}, Lcom/google/android/gms/maps/CameraUpdateFactory;->newCameraPosition(Lcom/google/android/gms/maps/model/CameraPosition;)Lcom/google/android/gms/maps/CameraUpdate;

    move-result-object p1

    new-instance p3, Llt/noframe/gpsfarmguide/sprayer/SprayController$5;

    invoke-direct {p3, p0}, Llt/noframe/gpsfarmguide/sprayer/SprayController$5;-><init>(Llt/noframe/gpsfarmguide/sprayer/SprayController;)V

    invoke-virtual {p2, p1, p3}, Lcom/google/android/gms/maps/GoogleMap;->animateCamera(Lcom/google/android/gms/maps/CameraUpdate;Lcom/google/android/gms/maps/GoogleMap$CancelableCallback;)V

    return-void
.end method

.method public setShtrich(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 9

    .line 596
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->generator:Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;

    if-eqz v0, :cond_0

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/utils/CancelableThread;->isRunning()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 597
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->generator:Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/utils/CancelableThread;->cancel()V

    .line 599
    :cond_0
    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getCurrent_measuring()Llt/noframe/gpsfarmguide/models/MeasuringModel;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/models/AbstractMeasuringModel;->getPoints()Ljava/util/List;

    move-result-object v4

    iget-wide v5, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->techWidth:D

    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->navig:Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    new-instance v8, Landroid/os/Handler;

    invoke-direct {v8}, Landroid/os/Handler;-><init>()V

    move-object v1, v0

    move-object v2, p1

    move-object v3, p2

    invoke-direct/range {v1 .. v8}, Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Ljava/util/List;DLlt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;Landroid/os/Handler;)V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->generator:Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;

    .line 600
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->generator:Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;

    invoke-virtual {p1, p0}, Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;->addOnShtrichLineSetListeners(Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator$OnShtrichLineSetListener;)V

    .line 601
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    const p2, 0x7f110187

    invoke-virtual {p1, p2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object p2

    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->ctx:Landroid/content/Context;

    const v1, 0x7f11004e

    invoke-virtual {v0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x1

    invoke-static {p1, p2, v0, v1}, Landroid/app/ProgressDialog;->show(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Landroid/app/ProgressDialog;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->progress:Landroid/app/ProgressDialog;

    .line 602
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->generator:Llt/noframe/gpsfarmguide/sprayer/navigation/AsyncNavigationLinesGenerator;

    invoke-virtual {p1}, Llt/noframe/gpsfarmguide/utils/CancelableThread;->start()V

    return-void
.end method

.method public sprayPoint(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 23

    move-object/from16 v0, p0

    move-object/from16 v2, p1

    .line 485
    iget-boolean v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->automaticBegin:Z

    const/4 v9, 0x1

    const/4 v10, 0x0

    if-eqz v1, :cond_0

    iget-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    if-eqz v1, :cond_0

    .line 486
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v3, v1, v2}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->lineSegmentBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v3

    invoke-virtual {v0, v2, v3, v4, v9}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->seekCamera(Lcom/google/android/gms/maps/model/LatLng;DZ)V

    .line 487
    iput-boolean v10, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->automaticBegin:Z

    const/4 v11, 0x1

    goto :goto_0

    :cond_0
    const/4 v11, 0x0

    .line 491
    :goto_0
    iget v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v3, 0x2

    if-ne v1, v3, :cond_1

    iget-boolean v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->autoFirstTaken:Z

    if-eqz v1, :cond_1

    .line 492
    iget v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->coordsCount:I

    add-int/2addr v1, v9

    iput v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->coordsCount:I

    .line 493
    iget v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->coordsCount:I

    if-le v1, v3, :cond_1

    .line 494
    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object v1

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/Data;->getNavigationTop()Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;

    move-result-object v1

    const/4 v3, 0x5

    invoke-virtual {v1, v3}, Llt/noframe/gpsfarmguide/widgets/TopNavigationBar/TopRunningNavigationBar;->setState(I)V

    :cond_1
    const-wide/high16 v3, 0x4028000000000000L    # 12.0

    .line 499
    iget-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    const/4 v12, 0x4

    if-eqz v1, :cond_6

    .line 501
    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v3, v1, v2}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->lineSegmentBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v14

    .line 502
    iget-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->markLocation:Lcom/google/android/gms/maps/model/Marker;

    double-to-float v3, v14

    invoke-virtual {v1, v3}, Lcom/google/android/gms/maps/model/Marker;->setRotation(F)V

    .line 504
    iget-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    invoke-virtual {v1, v3, v2}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->distanceBetween(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v21

    .line 509
    iget-wide v5, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->implement_location:D

    const-wide/16 v16, 0x0

    cmpl-double v1, v5, v16

    if-eqz v1, :cond_2

    .line 510
    iget-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    const-wide v7, 0x4066800000000000L    # 180.0

    move-object/from16 v2, p1

    move-wide v3, v14

    invoke-virtual/range {v1 .. v8}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    goto :goto_1

    :cond_2
    move-object v1, v2

    .line 512
    :goto_1
    iget-wide v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->gps_location:D

    cmpl-double v4, v2, v16

    if-eqz v4, :cond_3

    .line 513
    iget-object v13, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    const-wide v19, 0x4056800000000000L    # 90.0

    move-wide v4, v14

    move-object v14, v1

    move-wide v15, v4

    move-wide/from16 v17, v2

    invoke-virtual/range {v13 .. v20}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    goto :goto_2

    :cond_3
    move-wide v4, v14

    .line 515
    :goto_2
    iget v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    const/4 v3, 0x3

    if-eq v2, v3, :cond_4

    if-nez v11, :cond_4

    .line 516
    invoke-virtual {v0, v1, v4, v5, v10}, Llt/noframe/gpsfarmguide/sprayer/SprayController;->seekCamera(Lcom/google/android/gms/maps/model/LatLng;DZ)V

    .line 518
    :cond_4
    iget v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->status:I

    if-ne v2, v12, :cond_5

    .line 519
    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->navig:Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;

    iget-object v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    iget-object v4, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->crds:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v2, v1, v3, v4}, Llt/noframe/gpsfarmguide/sprayer/navigation/NavigationLines;->navigate(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Llt/noframe/gpsfarmguide/sprayer/CCalcs;)V

    :cond_5
    move-wide/from16 v3, v21

    goto :goto_3

    :cond_6
    move-object v1, v2

    :goto_3
    const-wide/high16 v5, 0x4000000000000000L    # 2.0

    cmpl-double v2, v3, v5

    if-lez v2, :cond_9

    .line 523
    iget v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    if-ne v2, v12, :cond_7

    iget-boolean v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->displayPolygons:Z

    if-eqz v2, :cond_7

    .line 524
    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayer:Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;

    invoke-interface {v2, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;->sprayPoint(Lcom/google/android/gms/maps/model/LatLng;)V

    .line 525
    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastSprayed:Lcom/google/android/gms/maps/model/LatLng;

    .line 527
    :cond_7
    iget-object v2, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->path:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    iget v3, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->sprayState:I

    if-ne v3, v12, :cond_8

    goto :goto_4

    :cond_8
    const/4 v9, 0x0

    :goto_4
    invoke-virtual {v2, v1, v9}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->addPoint(Lcom/google/android/gms/maps/model/LatLng;Z)V

    .line 528
    iput-object v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->lastPoint:Lcom/google/android/gms/maps/model/LatLng;

    .line 530
    :cond_9
    iget-boolean v1, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->resumed:Z

    if-eqz v1, :cond_a

    iput-boolean v10, v0, Llt/noframe/gpsfarmguide/sprayer/SprayController;->resumed:Z

    :cond_a
    return-void
.end method
